/*
-------------------------------------------------------------------
BIE is Copyright 2001-2004 Brunswick Corp.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/bie_license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------

*/
/*
 * LoggingTest.java
 *
 * Created on May 8, 2002, 4:01 PM
 */

package tests.prefs;

import java.util.logging.*;

import java.io.*;
/**
 *
 * @author  jdepons
 * @version 
 */
public class LoggingTest {

    /** Creates new LoggingTest */
    public LoggingTest() {
    }

    public static void main(String[] args) throws Exception{

        LogManager lm = LogManager.getLogManager();
        
        Logger logger = Logger.getLogger("loggingtest");        
        Logger logger2 = Logger.getLogger("loggingtest2");
                                
        FileHandler fh = new FileHandler("LoggingTest.log");
        
        // Send logger output to our FileHandler.
        logger.addHandler(fh);
        logger2.addHandler(fh);

        // Request that every detail gets logged.
        logger.setLevel(Level.ALL);
        logger2.setLevel(Level.ALL);
        
        // Log a simple INFO message.
        logger.info("doing stuff");
        
        logger2.info("logger2 doing stuff");
        
        try {
            File f = new File("sdfsf");
            FileInputStream fos = new FileInputStream(f);            
        }catch (Exception e) {
            logger.log(Level.WARNING, "trouble sneezing", e);
        }
        logger2.fine("done");        

    }
}